package com.crl.events
{
	import flash.events.Event;
	/**
	 * 参数改变事件对象. 
	 * @author crl
	 * 
	 */	
	public class PropertyChangeEvent extends Event
	{
		/**
		* 当参数改变是抛出的事件类型.
		*/		
		public static const PROPERTY_CHANGE:String = "property_change";
		/**
		* 参数名称
		*/		
		public var property:Object;
		/**
		* 原始值
		*/		
		public var oldValue:Object;
		/**
		* 新的值
		*/		
		public var newValue:Object;
		/**
		* 数据源
		*/		
		public var source:Object;
		
		/**
		 * 构造函数
		 * @param type
		 * @param bubbles
		 * @param cancelable
		 * @param property 参数名称
		 * @param oldValue 原始值
		 * @param newValue 新的值
		 * @param source 数据源
		 * @return 
		 * 
		 */		
		public function PropertyChangeEvent(type:String, source:Object = null,
											property:Object = null, 
											oldValue:Object = null,
											newValue:Object = null,
											bubbles:Boolean=false, cancelable:Boolean=false
										)
		{
			super(type, bubbles, cancelable);
			this.property = property;
			this.oldValue = oldValue;
			this.newValue = newValue;
			this.source = source;
		}
			
		override public function clone():Event{
			return new PropertyChangeEvent(type, source, property,
										 oldValue, newValue,bubbles,cancelable);
		}
	}
}